package com.pxst.bank.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.pxst.entity.BaseEntity;
import lombok.Data;

/**
 * 银行卡账户领取卡片纪录(bc120)
 * @TableName sys_bank_receive_record
 */
@TableName(value ="sys_bank_receive_record")
@Data
public class SysBankReceiveRecordEntity extends BaseEntity implements Serializable {
    /**
     * 领取主键ID
     */
    @TableId
    private Long id;

    /**
     * 银行卡ID
     */
    private Long bankCardId;

    /**
     * 管理员ID
     */
    private Long adminId;

    /**
     * 领取时间
     */
    private Date takenAt;

    /**
     * 返回时间
     */
    private Date returnAt;

    /**
     * 用户名
     */
    @TableField(exist = false)
    private String username;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysBankReceiveRecordEntity other = (SysBankReceiveRecordEntity) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getBankCardId() == null ? other.getBankCardId() == null : this.getBankCardId().equals(other.getBankCardId()))
            && (this.getAdminId() == null ? other.getAdminId() == null : this.getAdminId().equals(other.getAdminId()))
            && (this.getTakenAt() == null ? other.getTakenAt() == null : this.getTakenAt().equals(other.getTakenAt()))
            && (this.getReturnAt() == null ? other.getReturnAt() == null : this.getReturnAt().equals(other.getReturnAt()))
            && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
            && (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getBankCardId() == null) ? 0 : getBankCardId().hashCode());
        result = prime * result + ((getAdminId() == null) ? 0 : getAdminId().hashCode());
        result = prime * result + ((getTakenAt() == null) ? 0 : getTakenAt().hashCode());
        result = prime * result + ((getReturnAt() == null) ? 0 : getReturnAt().hashCode());
        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
        result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", bankCardId=").append(bankCardId);
        sb.append(", adminId=").append(adminId);
        sb.append(", takenAt=").append(takenAt);
        sb.append(", returnAt=").append(returnAt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}